<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>adminvue</title>
    <style>
      body{
        margin: 0;
        padding: 0;
        font-family: 'microsoft yahei';
      }
    </style>
  </head>
  <body>
    <div id="app"></div>
    <!-- built files will be auto injected -->

    <!-- 测试跨域问题 -->
    <script>
        function getQueryStr(sArgName){
            var args = window.location.href.split("?");
            console.log(args)
            var retval = "";
            if(args[0] == window.location.href) /*参数为空*/
            {
            return retval; /*无需做任何处理*/
            }
            var str = args[1];
            args = str.split("&");
            for(var i = 0; i < args.length; i ++)
            {
            str = args[i];
            var arg = str.split("=");
            if(arg.length <= 1) continue;
            if(arg[0] == sArgName) retval = arg[1];
            }
            return retval;
        }
        //获取父页面传递过来的值
        console.log(getQueryStr("postparams"))
        console.log(getQueryStr("postparams2"))
    </script>
  </body>
</html>
